package com.yixun.qfbao.response.premises.detail.util.resolveLabel;
/**
 * @author zilong.liu
 * @date 2020-9-9
 */
public class ResolveLabelUtil {

	/**
	 *  从输入的字符串中获取指定的开始到结束出现的位置之间的值
	 * @param label
	 * @return
	 */
	public String getAttrFromLabel(String label, String begin, String end) {
		int attrIndex = label.indexOf(begin);
		if(attrIndex > -1) {
			String attrBeginString = label.substring(attrIndex + begin.length());
			int endIndex = attrBeginString.indexOf(end);
			if(endIndex > -1) {
				return attrBeginString.substring(0, endIndex);
			}
			return label;
		}
		return label;
	}
}
